import { http } from "@/utils/http";
import { baseUrlApi } from "./urils";

interface Result {
  code: number;
  msg: string;
  data: object;
  userId: number;
}

export const insNumberApi = data => {
  return http.request<Result>("post", baseUrlApi("countingSign/insNumber"), {
    data
  });
};

interface Page {
  total: number;
  records: object;
}

interface SelBatchInfoApiResult {
  code: number;
  msg: string;
  data: Page;
}

export const selBatchInfoApi = data => {
  console.log(data);

  return http.request<SelBatchInfoApiResult>(
    "post",
    baseUrlApi("countingSign/selBatchInfo"),
    {
      data
    }
  );
};

export const delNumberByBatchCodeApi = data => {
  return http.request<Result>(
    "post",
    baseUrlApi("countingSign/delNumberByBatchCode"),
    { data }
  );
};
